﻿using System.Threading.Tasks;

namespace Wombat.DbToDwAdapter
{
    public sealed class SyncToDw
    {
        private readonly IOrchestrator _orchestrator;

        public SyncToDw(IOrchestrator orchestrator, ISyncDataSource source, ISyncDataSource destination)
        {
            _orchestrator = orchestrator;
            orchestrator.SetSource(source);
            orchestrator.SetDestination(destination);
        }

        public async Task Synchronize()
        {
            await _orchestrator.OrchestrateAsync();
        }
    }
}
